package com.xr.common.axios;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AxiosEnum {

    /**
     * 成功枚举（状态码 + 消息）
     */
    SUCCESS(10000, "执行成功"),
    INSERT_SUCCESS(10000, "新增成功"),
    DELETE_SUCCESS(10000, "删除成功"),
    UPDATE_SUCCESS(10000, "更新成功"),
    SELECT_SUCCESS(10000, "查询成功"),
    REGISTER_SUCCESS(10000, "注册成功"),
    LOGIN_SUCCESS(10000, "登录成功"),
    IMPORT_SUCCESS(10000, "文件导入成功"),
    EXPORT_SUCCESS(10000, "文件导出成功"),

    /**
     * 失败枚举（状态码 + 消息）
     */
    ERROR(50000, "执行失败"),
    UNKNOWN_ERROR(50000, "服务器异常"),
    INSERT_ERROR(50001, "新增失败"),
    DELETE_ERROR(50002, "删除失败"),
    UPDATE_ERROR(50003, "更新失败"),
    SELECT_ERROR(50004, "查询失败"),
    REGISTER_ERROR(50005, "注册失败，用户名已存在"),
    LOGIN_ERROR(50006, "登录失败，用户名与密码不匹配"),
    ACCOUNT_ERROR(50007, "账号已被禁用，请联系管理员"),
    PERMISSION_ERROR(50008, "访问权限不足"),
    REMOTE_ERROR(50009, "远程调用失败"),
    NULL_POINTER_ERROR(50010, "发生空指针异常"),
    UNIQUE_ERROR(50011, "新增失败，字段值不能重复"),
    PARAMETER_ERROR(50012, "参数错误"),
    IMPORT_ERROR(50013, "文件导入失败");

    private final Integer code;
    private final String msg;

}
